package com.zzz.friend.service.blog.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zzz.friend.domain.blog.dto.BlogQueryDTO;
import com.zzz.friend.domain.blog.vo.BlogVO;
import com.zzz.friend.mapper.blog.BlogMapper;
import com.zzz.friend.service.blog.BlogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @BelongsProject: oj-project
 * @BelongsPackage: com.zzz.friend.service.blog.impl
 * @Author: zhai
 * @CreateTime: 2025-11-01  14:31
 * @Description: TODO
 * @Version: 1.0
 */
@Slf4j
@Service
public class BlogServiceImpl implements BlogService {

    @Autowired
    private BlogMapper blogMapper;

    @Override
    public List<BlogVO> list(BlogQueryDTO blogQueryDTO) {
        PageHelper.startPage(blogQueryDTO.getPageNum(), blogQueryDTO.getPageSize());
        return blogMapper.list(blogQueryDTO);
    }
}
